﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="lc_AddJob.aspx.cs" Inherits="HFWebApp.lawyeruser.lc_AddJob" %>
<%@ Register src="../Control/top.ascx" tagname="top" tagprefix="uc1" %>
<%@ Register src="../Control/end.ascx" tagname="end" tagprefix="uc2" %>
<%@ Register src="c_LeftMenu.ascx" tagname="c_LeftMenu" tagprefix="uc3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<title>用户管理中心_红法网</title>
<link href="<%=this.getDemain %>/Style/Style.css" rel="stylesheet" type="text/css" />
<link href="<%=this.getDemain %>/Style/CenterStyle.css" rel="stylesheet" type="text/css" />
<link href="<%=this.getDemain %>/CSS.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=this.getDemain %>/Scripts/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=this.getDemain %>/javascript/SwitchTags.js"></script>
<script type="text/javascript" src="<%=this.getDemain %>/Scripts/WebFunction.js"></script>
<script type="text/javascript">
    $(function () {
        loadProvince('ask_provinceid', 'ask_cityid');
    });

    function sendMessage() {
        var units = $("#unit");
        if (units.val() == "") {
            alert('请填写单位名称');
            units.focus();
            return false;
        }
        var jobsid = $("#jobsid");
        if (jobsid.val() == "0") {
            alert('请选择工作种类');
            jobsid.focus();
            return false;
        }
        var personcount = $("#personcount");
        if (personcount.val() == "") {
            alert('请填写招聘人数');
            personcount.focus();
            return false;
        }
        var contact = $("#contact");
        var academic = $("#academic");
        var endtimeCount = $("#endtimeCount");
        var phone = $("#phone");
        if (phone.val() == "") {
            alert('请填写联系电话');
            phone.focus();
            return false;
        }
        var email = $("#email");
        if (email.val() == "") {
            alert('请填写Email，以便及时收到应聘者邮件');
            email.focus();
            return false;
        }
        var chkEmail = new RegExp(/\w@\w*\.\w/);
        if (!chkEmail.exec(email.val())) {
            alert("Email格式不正确");
            email.focus();
            return false;
        }
        var addr = $("#addr");
        var content = $("#content");
        var unitcontent = $("#unitcontent");

        $.getJSON(
            "/AjaxSource/AddJobs.ashx",
            {
                jobsid: jobsid.val(),
                personcount: personcount.val(),
                contact: contact.val(),
                academic: academic.val(),
                endtimeCount: endtimeCount.val(),
                phone: phone.val(),
                email: email.val(),
                addr: addr.val(),
                content: content.val(),
                unitcontent: unitcontent.val(),
                units: units.val(),
                rand: Math.floor(Math.random() * 10000).toString()
            },
            function (jsonData) {
                alert(jsonData.Message);
                if (jsonData.isTrue) {
                    location = 'lc_jobList.aspx';
                }
            }
        );

        return false;
    }
</script>
    <style type="text/css">
        #Textarea1
        {
            height: 307px;
            width: 490px;
        }
        #Textarea2
        {
            height: 165px;
            width: 488px;
        }
        #content
        {
            height: 149px;
            width: 380px;
        }
        #unitcontent
        {
            height: 163px;
            width: 380px;
        }
    </style>
</head>

<body>
<uc1:top ID="top1" MenuClassID="1" focusLink1="focusLink" runat="server" />
<div id="c_BodyBox">
    <div class="c_LeftMenu">
        <uc3:c_LeftMenu ID="c_LeftMenu1" runat="server" />
    </div>
    <div class="c_RightContent">
        <h3>发布招聘信息</h3>
            <div class="c_MessageBox">
            <ul>
            <form id="Form1" onsubmit="return sendMessage();">
                <li>
                    <div class="c_MB_Left">单位</div>
                    <div class="c_MB_Mid"><input name="unit" type="text" id="unit" value="" size="32" /></div>
                    <div class="c_MB_Right"></div>
                </li>
                <li>
                    <div class="c_MB_Left">招聘职位</div>
                    <div class="c_MB_Mid"><select name="jobsid" id="jobsid">
                          <option value="0">请选择</option>
                        <asp:Repeater ID="Repeater1" runat="server">
                            <ItemTemplate>
                                <option value="<%#Eval("ID") %>"><%#Eval("JobsName") %></option>
                            </ItemTemplate>
                        </asp:Repeater>
                        </select></div>
                    <div class="c_MB_Right"></div>
                </li>
                <li>
                    <div class="c_MB_Left">招聘人数</div>
                    <div class="c_MB_Mid"><input name="personcount" type="text" id="personcount" value="1" size="2" />人</div>
                    <div class="c_MB_Right"></div>
                </li>
                <li>
                    <div class="c_MB_Left">联系人</div>
                    <div class="c_MB_Mid"><input name="contact" type="text" id="contact" value="" size="10" /></div>
                    <div class="c_MB_Right"></div>
                </li>
                <li>
                    <div class="c_MB_Left">学历要求</div>
                    <div class="c_MB_Mid"><input name="academic" type="text" id="academic" value="大专" size="10" /></div>
                    <div class="c_MB_Right"></div>
                </li>
                <li>
                    <div class="c_MB_Left">有效期</div>
                    <div class="c_MB_Mid_Fix">&nbsp;<input name="endtimeCount" value="3" id="endtimeCount" type="radio" />三天&nbsp;
                        &nbsp;<input name="endtimeCount" value="7" id="endtimeCount"type="radio" />一周&nbsp;
                        &nbsp;<input  checked="checked" name="endtimeCount" value="15" id="endtimeCount" type="radio" />十五天&nbsp;
                        &nbsp;<input name="endtimeCount" value="30" id="endtimeCount"type="radio" />一个月&nbsp;
                        &nbsp;<input name="endtimeCount" value="61" id="endtimeCount"type="radio" />两个月&nbsp;
                        &nbsp;<input name="endtimeCount" value="184" id="endtimeCount"type="radio" />半年&nbsp;</div>
                </li>
                <li>
                    <div class="c_MB_Left">电话</div>
                    <div class="c_MB_Mid"><input name="phone" type="text" id="phone" value="" size="10" /></div>
                    <div class="c_MB_Right"></div>
                </li>
                <li>
                    <div class="c_MB_Left">Email</div>
                    <div class="c_MB_Mid"><input name="email" type="text" id="email" value="" size="32" /></div>
                    <div class="c_MB_Right"></div>
                </li>
                <li>
                    <div class="c_MB_Left">联系地址</div>
                    <div class="c_MB_Mid"><input name="addr" type="text" id="addr" value="" size="32" /></div>
                    <div class="c_MB_Right"></div>
                </li>
                <li>
                    <div class="c_MB_Left">招聘介绍</div>
                    <div class="c_MB_Mid_Fix"><textarea name="content" id="content"></textarea><br /></div>
                </li>
                <li>
                    <div class="c_MB_Left">单位介绍</div>
                    <div class="c_MB_Mid_Fix"><textarea name="unitcontent" id="unitcontent"></textarea><br /></div>
                </li>
                <li>
                    <div class="c_MB_Left"></div>
                    <div class="c_MB_Mid"><input id="Button2" type="submit" value="保存" /></div>
                    <div class="c_MB_Right"></div>
                </li>
            </form>
            </ul>
        </div>
</div>
</div>
<uc2:end ID="end1" runat="server" />
</body>
</html>